﻿@{
    ViewBag.Title = "同步扩展数据";
    ViewBag.MIndex = 8;
    ViewBag.CIndex = 3;
    ViewBag.BodyTitle = "权限扩展数据同步";
}
@section Functions{
    <li><input class="button" type="button" value="获取数据" onclick="GetSyncData();" /></li>
    <li><input class="button" type="button" value="开始同步" onclick="dataSave();" /></li>
    <li><input class="button" type="button" value="返 回" onclick="GotoHref('/Extent/List/1');" /></li>
}
@Html.AntiForgeryToken()
<div class="tab-content default-tab" id="tab1">
    <div id="table-search">
        <div class="search-box">
            <label>扩展设定：</label>
            <label>扩展编码：</label>
            <input class="input-text search-text1" type="text" id="txtSetCode" />
            <label>编码名称：</label>
            <input class="input-text search-text1" type="text" id="txtSetName" />           
            <label>同步选项：</label>
            <select class="input-text search-text3" id="sltSyncItem">                
                <option value="1">保留已同步数据</option>
                <option value="2" selected="selected">替换已同步数据</option>
            </select> 
            <label>数据表名：</label>
            <input class="input-text search-text1" type="text" id="txtFieldTable" value="table_name" />            
        </div>
        <div class="search-box">
            <label>字段名称：</label>            
            <label>扩展标识：</label>
            <input class="input-text search-text1" type="text" id="txtFieldMark" value="field_mark" />
            <label>标识名称：</label>
            <input class="input-text search-text1" type="text" id="txtFieldName" value="field_name" />
            <label>扩展备注：</label>
            <input class="input-text search-text1" type="text" id="txtFieldMemo" value="field_memo" title="如果没有[扩展备注]请填入：null" />
            <label>查询条件：</label>
            <input class="input-text search-text1" type="text" id="txtFieldWhere" value="1==1 and 1<>1" title="如果没有[查询条件]请填入：null" />
        </div>
        <div class="search-box">
            <label>连接属性：</label>
            <label>数据源：</label>
            <input class="input-text search-text1" type="text" id="txtConnSource" value="(local)" />
            <label>数据库名：</label>
            <input class="input-text search-text1" type="text" id="txtConnData" value="DbName" />
            <label>用户名称：</label>
            <input class="input-text search-text1" type="text" id="txtConnUser" value="sasa" />
            <label>用户密码：</label>
            <input class="input-text search-text1" type="text" id="txtConnPwd" value="sasa" />
        </div>
        <div class="clearfix"></div>
    </div>
    <table id="table-thead">
        <thead>
            <tr>
                <th class="per15">扩展编码</th>
                <th class="per20">编码名称</th>
                <th class="per15">扩展标识</th>
                <th class="per20">标识名称</th>
                <th class="per15">扩展备注</th>
            </tr>
        </thead>
    </table>
    <div id="table-tbody">
        <table>
            <tbody id="dataShowArea">
                <tr><td colspan="5"><span class="color-blue f14 margin-left-10">等待同步！</span></td></tr>
            </tbody>
        </table>
    </div>
</div>
@section Scripts{
    @Scripts.Render("~/js/validate")
    <script src="@Scripts.Url("~/Scripts/extent/sync.js")" type="text/javascript"></script>
}